package Assignment;


public class Test13 {
    public static void main(String[] args) {
        int beginYear = 1988;
        int endYear = 2019;
        //while
        while (beginYear < endYear) {
            if ((beginYear % 4 == 0 && beginYear % 100 != 0) || beginYear % 400 == 0) {
                System.out.println(beginYear + "是闰年");
            }
            beginYear++;
        }

        System.out.println("*******************");
        //for
        for (int i = 1988; i < endYear; i++) {
            if ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0) {
                System.out.println(i + "是闰年");
            }
        }

    }
}
